
const todoList = (props:any) => {
    const {foo,handler,list = [],children} = props
    return (
        <div>
            <div onClick={() => {
              handler('点击了')  
            }}>{foo}</div>
            <ul>
                {list.map((item:any) => (
                    <li key={item.id}>{item.name}</li>
                ))}
            </ul>
            {children}
        </div>
    );
};

export default todoList;